<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">

<head>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"/>
    <title th:utext="#{label.pages.home.title}"></title>
</head>
<body>
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" th:href="@{/homepage.html}" th:utext="#{label.pages.home.title}">home</a>
        </div>
        <ul class="nav navbar-nav navbar-right">
            <li><a th:href="@{/logout}" th:utext="#{label.pages.logout}">logout</a> </li>
        </ul>
    </div>
</nav>

<div class="container">
    <h1>Role Hierarchy</h1>
    <p sec:authorize="hasRole('ADMIN')" th:utext="${adminMessage}">Access to ADMIN section</p>
    <p sec:authorize="hasRole('STAFF')" th:utext="${staffMessage}">Access to STAFF section</p>
    <p sec:authorize="hasRole('USER')" th:utext="${userMessage}">Access to USER section</p>
</div>
</body>
</html>